package com.larsgard.gedviewer.server.storage;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.Text;
import com.larsgard.gedviewer.server.storage.entities.PersitenceCapable;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class GedFile implements PersitenceCapable {

    private static final long serialVersionUID = 3425832855266548915L;

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String treeId;

    @Persistent
    private String fileId;

    @Persistent
    private Text gedFile;

    public GedFile() {

    }

    @Override
    public void setKey(Key key) {
	this.key = key;
    }

    public void setGedFile(Text gedFile) {
	this.gedFile = gedFile;
    }

    public Text getGedFile() {
	return gedFile;
    }

    @Override
    public Key getKey() {
	return key;
    }

    public void setTreeId(String treeId) {
	this.treeId = treeId;
    }

    public String getTreeId() {
	return treeId;
    }

    public void setFileId(String fileId) {
	this.fileId = fileId;
    }

    public String getFileId() {
	return fileId;
    }

}
